<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>乾颐堂Django登录</title>
    {% load static %}
    <!-- 加载图表文件-->
    <link rel="shortcut icon" href="{% static "images/favicon.ico"%}"
    <!-- bootstrap login CSS -->
    <link rel="stylesheet" href="{% static "css/signin.css" %}">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body>
  <form class="form-signin" action="" method="post">
      {% csrf_token %}
      {% load static %}
      <img class="mb-4" src="{% static "images/logo.jpg"%}" alt="" width="100" height="100">
      <h1 class="h3 mb-3 font-weight-normal">请登录</h1>
      {% if error %}
      {# 调整了bootstrap的显示样式 #}
      <div class="alert alert-danger" role="alert">{{ error }}</div>
      {% endif %}
      {% for field in form %}
                <div class=form-group>
                    {# 显示输字段 #}
                    {{ field }}
                </div>
      {% endfor %}
      <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
      <p class="mt-5 mb-3 text-muted">&copy; 2017-2018</p>
</form>
</body>
</html>
